var arr = [1, '123', true];
var arr1 = ['zyh'];
var arr2 = [1, 2, 3];
var arr3 = [true, false];
var arr4 = [
    {
        name: '123',
        age: 22
    },
    {
        name: '123',
        age: 22
    },
];
var str = '';
var fun = function (can1, can2) {
    return can1 + can2;
};
var bol = true;
var num = 123;
var obj = {
    a: 'zyh'
};
//数组方法
//    push在后面添加数据
//    sort排序
//    shift删除返回第一个数据
//    unshift在数组开头增加
//    join数组改成字符串    
var Arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1];
var NewArr = [];
Arr.forEach(function (item, index) {
    if (!NewArr.includes(item)) {
        NewArr.push(item);
    }
});
console.log(NewArr, '123');
var Brr = [1, 2, 3, 4, 5, 6, 7, 8, 9];
Brr.forEach(function (item, index) {
    if (!(item == Brr.pop())) {
        Brr.push(item);
    }
});
console.log(Brr);
